package com.xzq.erp.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.xzq.erp.domain.po.Supplier;
import com.xzq.erp.domain.vo.IdAndNameVO;
import com.xzq.erp.mapper.SupplierMapper;
import com.xzq.erp.service.ISupplierService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 供应商表 服务实现类
 * </p>
 *
 * @author xzq
 * @since 2025-05-26
 */
@Service
public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> implements ISupplierService {

    @Override
    public List<IdAndNameVO> getSupplierList() {
        List<Supplier> list = lambdaQuery().list();
        return BeanUtil.copyToList(list, IdAndNameVO.class);
    }
}
